package pages;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class LoginPage extends AnyPage {
	
	@FindBy (id = "username")
	public WebElement userNameFieldOnLoginPage;
	
	@FindBy (name = "password")
	public WebElement passwordField;
	
	@FindBy (name = "submit")
	public WebElement loginButton;  
	
	@FindBy (css = "td.error")
	public WebElement IncorrectUserNameOrPasswordString; 
	
	public boolean checkUserNameFieldExist (){
		return userNameFieldOnLoginPage.isDisplayed();
	}
	
	public boolean isOnThisPage (){		
		return loginButton.isDisplayed();
	}
}
